# -*- coding: utf-8 -*-
"""
Created on Tue Feb  2 15:43:46 2021

@author: rober
"""
from NewmarkCA import newmarkCA 
import numpy as np

def spectrumA(file,dt,Npt,T):
    
    fa = np.loadtxt(file)*9805
    
    Sa = np.zeros(len(T))
    
    Sa[0] = max(abs(fa))/9805
    
    for i in range(1,len(T)):

        Sa[i] = newmarkCA(T[i],0.05,fa,dt,Npt)/9805
        
    return Sa
